forum

home / developersection / forums / nsmutablearray destruction

NSMutableArray destruction

Anonymous User 1917 23-Aug-2015

I have an array NSMutableArray with happy objects. These objects viciously turn on (leak) me whenever I try to clear the array of all the objects and repopulate it. 

It's allocated in the init function like so 

self.list = [NSMutableArray array];

The different methods I have used to clear it out include:

self.list = nil;

self.list = [NSMutableArray array];

and

[self.eventList removeAllObjects]; 

Explicitly allocating and releasing the array doesn't work either. The leak ONLY occurs when I try to reset the list.

Am I missing a step when resetting or is this a different problem?


Updated on 24-Aug-2015

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By